/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.utilidad.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author angelquingaluisa
 */
@Entity
@Table(name = "tipoidentificacion")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TipoIdentificacion.findAll", query = "SELECT c FROM TipoIdentificacion c"),
    @NamedQuery(name = "TipoIdentificacion.findBycodigoTipIde", query = "SELECT c FROM TipoIdentificacion c WHERE c.codigoTipIde = :codigoTipIde"),
    @NamedQuery(name = "TipoIdentificacion.findBynombreTipIde", query = "SELECT c FROM TipoIdentificacion c WHERE c.nombreTipIde = :nombreTipIde")})
public class TipoIdentificacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 3)
    @Column(name = "codigo_tipide")
    private String codigoTipIde;
    @Size(max = 45)
    @Column(name = "nombre_tipide")
    private String nombreTipIde;
    
    public TipoIdentificacion() {
    }

    public String getCodigoTipIde() {
        return codigoTipIde;
    }

    public void setCodigoTipIde(String codigoTipIde) {
        this.codigoTipIde = codigoTipIde;
    }

    public String getNombreTipIde() {
        return nombreTipIde;
    }

    public void setNombreTipIde(String nombreTipIde) {
        this.nombreTipIde = nombreTipIde;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codigoTipIde != null ? codigoTipIde.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoIdentificacion)) {
            return false;
        }
        TipoIdentificacion other = (TipoIdentificacion) object;
        if ((this.codigoTipIde == null && other.codigoTipIde != null) || (this.codigoTipIde != null && !this.codigoTipIde.equals(other.codigoTipIde))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.TipoIdentificacion[ codigoTipIde=" + codigoTipIde + " ]";
    }
    
}
